﻿using Max.PH4_2102A.Shopping.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4_2102A.Shopping.IService
{
    /// <summary>
    /// 分类的服务接口
    /// </summary>
    public interface ICategoryService
    {
        int Insert(CategoryModel model); //添加
        int Update(CategoryModel model); //修改
        int Delete(CategoryModel model); //删除
        int Delete(List<CategoryModel> brands); //批量删除
        IQueryable<CategoryModel> GetAll(); //获取所有数据
        IQueryable<CategoryModel> GetAll(string brandName); //根据名称查询所有数据

        //根据名称查询并分页
        IQueryable<CategoryModel> GetAll(string brandName, int pageIndex, int pageSize, out int total);

        //根据名称查询、排序并分页
        IQueryable<CategoryModel> GetAll(string brandName, bool isAsc, int pageIndex, int pageSize, out int total);

        List<dynamic> SelectCategory();

    }
}
